﻿@** Copyright 2013 Seven Spikes Ltd. All rights reserved. (http://www.nop-templates.com)
* http://www.nop-templates.com/t/licensinginfo
*@

@using Nop.Core.Infrastructure
@model SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuManufacturersModels
@if (Model.ManufacturersModels.Count > 0)
{
    var megaMenuSettings = EngineContext.Current.Resolve<SevenSpikes.Nop.Plugins.MegaMenu.Domain.MegaMenuSettings>();
    <li>
        @if (Model.ManufacturersModels.Count > 0)
        {
            <div class="nav-item-wrapper">
                <a href="@Url.RouteUrl("ManufacturerList")">@T("SevenSpikes.MegaMenu.Admin.Settings.ManufacturersItemNameValue")</a>
                <div class="plus-button"></div>
            </div>
            <div class="dropdown">
                <ul>
                    @{
            foreach (var manufacturer in Model.ManufacturersModels)
            {
                        <li>
                            <a href="@Url.RouteUrl("Manufacturer", new { SeName = manufacturer.SeName })">@manufacturer.Name</a>
                        </li>   
            }
            if (Model.ManufacturersModels.Count == megaMenuSettings.NumberOfManufacturers)
            {
                        <li>
                            <a class="view-all" href="@Url.RouteUrl("ManufacturerList")">@T("SevenSpikes.MegaMenu.ViewAllManufacturers")</a>
                        </li>
            }
                    }
                </ul>
            </div>
            <!--dropdown-->
        }
        else
        {
            <a href="@Url.RouteUrl("ManufacturerList")">@T("SevenSpikes.MegaMenu.Admin.Settings.ManufacturersItemNameValue")</a>
        }
    </li>
}
